import { director } from 'cc';

export function load() {

 };
export function unload() { 

};
export const methods = { 
    getScene() {
        const scene = director.getScene();
        console.log("getScene:", scene);
        const canvas = scene.getChildByName("Canvas");
        console.log("canvas", canvas);
        const testNode = canvas.getChildByName("TestFindNode");
        console.log("testNode", testNode);
        const ButtonNode = testNode.getChildByName("Button");
        console.log("ButtonNode", ButtonNode);
        const com = testNode.getComponent("TestFindNodeCom");
        console.log("com", com);
        com.buttonNode = ButtonNode;
    }
};